Keyboards are widespread as a standard input device for many electronic devices. In Personal Computers (PC), for instance, the keyboard is the main input device available for users to enter data and interact with the PC.
PC keyboards usually comprise keys for typing, numbers, alphabetic letters, algebraic operators, special functions and more. Because of the large number of keys, it is customary to arrange the keys in a matrix, each key being implemented by a switch that has a unique two-dimensional location of the matrix, indicated by a row and column number. When a key is pressed, the mechanical operation is transferred to a corresponding switch, which in response changes its state to a conducting state. In order to detect depressed keys, the matrix is scanned to reveal switches that are closed (conducting), corresponding to a pressed key. A typical conventional keyboard further comprises an encoder, which translates the location (row and column) of the closed switch in the matrix into a code symbol that is later used to uniquely identify the depressed key.
FIG. 1 schematically illustrates a prior art keyboard matrix depicting the matrix scan procedure that is required to detect a depressed key. The matrix is constructed from horizontal and vertical conducting lines, which form the matrix rows and columns, respectively. Two columns (KBSout1, KBSout2) are the matrix's drive lines, and two rows (KBSin1, KBSin2) represent the sense lines of the keyboard matrix. KBSout1 and KBSout2 are grounded through the N-channel MOSFET transistors, Q1 and Q2, respectively. Each transistor implements an Electronic Switch (ES), which is activated when a Scan Pulse (SP) is applied to its gate.
The row and column junctions of the keyboard matrix in FIG. 1 are coupled by the Key Switches (KS): KS11, KS12, KS21, and KS22. The matrix is scanned column by column by applying an SP to each drive line ES, one at a time. When an SP is applied to one of the drive lines ES (e.g., ES1), the corresponding electronic switch that is connected to that drive line is turned ON (i.e., Q1 is switched to its conducting state), thereby enabling electric current flow through that drive line to ground. If all the KSs are open, then no current flows and the voltage level of all the sense lines equals VCC (normally a “1” logic). If a KSji on the scanned drive line is closed (i.e., a pressed key), when ESi is applied with a Scan Pulse (SP) KBSouti is pulled to LOW. Consequently, the electric voltage on the KBSin line that corresponds to the row that contains the closed switch (KBSinj) drops to a lower level voltage Vd, thereby indicating the row number (i.e., j) and the column number (i.e., i) of the closed switch.
The value of the resistors Rp and the transistors' on voltage (Vd) are designed such that the row voltage Vj (Vj=Vd, j=1,2) is identified as a “0” logic by the input gate on KBSinj. This way, the depressed keys' rows and columns are located. For example, if an SP is applied to drive line KBSout1 (i.e., to ES1), and KS11 is closed, the voltage on sense line KBSin1 drops from VCC to Vd, indicating a key closure between the KBSout1 column and the KBSin1 row.
False detection occurs when several keys are simultaneously pressed. This is known in the art as the “phantom key” problem, that is, when closed circuits are formed by several KS being pressed simultaneously, which results in false indication of pressed keys. For example, if KS11, KS12, and KS22 of the keyboard matrix are simultaneously pressed when the SP is applied to KBSout1 (ES1), the current that flows through Rp2, KS22, KS12 (in the reverse direction) and KS1, to ground, causes a voltage drop (from Vcc to Vd) on KBSin2, resulting in false indication of KS21 as closed.
Solving the “phantom key” problem is necessary to achieve a proper detection whenever several keys are simultaneously pressed. This problem is also known as “n key rollover.” The keyboard encoder is designed to resolve “n key rollover” conditions and “phantom” keys, and in addition, to perform switch contact debouncing.
A prior art implementation that resolves “phantom” key problems is depicted in FIG. 2, which illustrates a keyboard construction with diodes connected in series to each KS of the keyboard matrix. The diodes in this implementation eliminate the “reverse” current flow through KS12 (with reference to the previous example) and therefore prevent the “phantom key” problem. In this way, “n key rollover” is prevented. This solution does have the side effect that the diodes forward drop adds to Vd, which forces a higher value for the highest voltage that is still considered as a “0” logic state of the KBSin inputs. In addition, keyboard parts count is substantially increased (series diodes) resulting in an expensive assembly of the keyboard.
Another keyboard implementation that resolves the “n key rollover” problem is the resistive matrix keyboard, depicted in FIG. 3, in which a closed KS presents a non-zero resistance rather than a short circuit. When a key is pressed, its resistance provides the electrical connection required for indicating a key closure. The resistive matrix outputs a set of analog signals, rather than digital logic values. An array of comparators (CMP), each of which is fed by a predetermined threshold voltage, is used to distinguish between the voltage levels cause by one, or “n key” pressing.
A diversity of analog voltage levels appears at the resistive matrix rows KBSinj, in accordance to the number of keys pressed. The voltage difference between an actual (real) KS closure and a faulty closure indication (i.e., “phantom” key) is relatively small, so that the threshold voltage level (Vref) should be carefully determined to ensure a correct detection of the pressed keys by the set of comparators. However, deviations of the KS resistance values in the matrix result in changes of the voltage levels, which may be a source for faulty KS closure detection. The voltage level variation is affected by tolerances of the KS resistance values during production and by environmental effects like temperature, moisture, dust and corrosion of the contacts. Moreover, the threshold voltage levels usually fluctuate over time and temperature, contributing more imprecision.
In the design and manufacture of a portable PC (e.g., a “laptop”), a great effort is invested to substantially reduce the device's size, weight, and power consumption. Reduction of the power consumption is essential to achieve a long term operation of electronic mobile and wireless devices operating from a battery power supply. In order to reduce the device's size, and increase the efficiency, an embedded controller (EC) is utilized to interact with the laptop's input/output (I/O) devices.
The power consumption of the EC is influenced by the controller operation. It is desired to reduce the controller activity to a minimum by executing a fast matrix scan and by halting the controller operation when it is not needed. When halted, the system can be in a standby mode, in which the matrix is only sensed to detect a press condition on any of the keys, or on a specific subset of them, as an indication for activity. This is known as “any key pressed” detection, and it is performed by applying one SP to all the drive lines and testing the sense lines voltage levels. If a key is pressed it is detected by a logic “0” in one of the KBSin inputs, this indication is utilized as a wake event to the EC. In response, once the activity in the EC is resumed, it will use the normal key scan process to detect exactly which key is pressed.
The Mitsubishi 3886 device is a prior art micro-computer with an embedded comparator circuit, which is utilized to interface with a resistive matrix. The comparator circuit compares simultaneously up to eight (8) analog inputs with a single reference voltage. An internal resistive voltage divider is utilized to produce the reference voltage. Only one division ratio is provided or the use of an external voltage reference is required, with the increased cost associated. The comparator circuit is operated by software, and thus the microcomputer is always involved in monitoring the keyboard. Any key detection is possible only when the processor is active since no wakeup interrupt is available from the comparator. Also, processor activity is required for controlling the current consumption of the circuit via timed enable and disable. No hardware support is provided for debouncing the comparator output against noise, or for controlling the thresholds in case of misfit.
Other prior art methods utilize Analog to Digital (A/D) converters to monitor and detect the resistive matrix sense line signals (KBSin). A/D conversion of the matrix analog signals enables digital processing with higher accuracy, and overcomes the resistive matrix imprecision that was previously discussed. The Hitachi H8S/2144 and H8S/2148 series are prior art single-chip microcomputers with an embedded A/D converter. A/D conversion of the sense line signals is selected through an analog multiplexer. A successive approximation A/D is utilized to measure the input voltage of one input at a time. A complete scan of the matrix sense lines involves a sequence of conversions. For a complete scan of the matrix n times m conversions are required, where n is the number of rows and m is the number of columns. This substantially increases the current consumption required for the conversion due to the large number of conversion operations and the continuous intervention of the processor. In addition, this scheme does not allow “any key press detection” since the KBSin signals need to be scanned.
All the methods described above have not yet provided satisfactory solutions for fast “n key rollover” with low power consumption implementations for resistive matrix keyboards.